[URGENT] IE: ‘nodeType’ is null or not an object

Posted by Patrick on Stack Overflow See other posts from Stack Overflow or by Patrick
Published on 2010-06-11T12:30:40Z Indexed on 2010/06/12 12:42 UTC
Read the original article Hit count: 491

hi,

I'm having this issue on my website in IE (6,7,8):

‘nodeType’ is null or not an object

The error refers to "f.nodeType" property. Basically f is undefined, so the issue is before, but I cannot fix it.

Could you give me some help ? www.donatellabernardi.ch/drupal

(from IE developer toolbar debug it appears to be this line that is throwing the error) (autocolumn.min.js line 13 expanded below for readability)

function split($putInHere,$pullOutHere,$parentColumn,height){
  if($pullOutHere.children().length){
    $cloneMe=$pullOutHere.children(":first");
    $clone=$cloneMe.clone(true);
    if($clone.attr("nodeType")==1&&!$clone.hasClass("dontend")){
    ^^^^^^^^^^^^^^^^^^^^^^^^^^ Chokes on

      $putInHere.append($clone);
      if($clone.is("img")&&$parentColumn.height()<height+20){
        $cloneMe.remove();
      }else if(!$cloneMe.hasClass("dontsplit")&&$parentColumn.height()<height+20){
        $cloneMe.remove();
      }else if($clone.is("img")||$cloneMe.hasClass("dontsplit")){
        $clone.remove();
      }else{
        $clone.empty();
        if(!columnize($clone,$cloneMe,$parentColumn,height)){
          if($cloneMe.children().length){
            split($clone,$cloneMe,$parentColumn,height);
          }
        }
        if($clone.get(0).childNodes.length==0){
          $clone.remove();
        }
      }
    }
  }
}

Thanks

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about internet-explorer